package 创建者模式.建造者模式;

/**
 * @Description TODO
 * @Author shallow
 * @Date 2023/3/4 13:04
 */

public class Director {
    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }

    public Bike construct(){
        builder.buildFrame();
        builder.buildSeat();
        Bike bike = builder.createBike();
        System.out.println("组装自行车："+bike.getFrame()+"+"+bike.getSeat());
        return bike;
    }
}
